package com.example.communitypro.pojo;

import java.io.Serializable;

public class UserResource implements Serializable {
    private Integer userResourceNo;

    private Integer userNo;

    private Integer communityNo;

    private String wpUrl;

    private String wpPassword;

    private String resourceIntro;

    private static final long serialVersionUID = 1L;

    public Integer getUserResourceNo() {
        return userResourceNo;
    }

    public void setUserResourceNo(Integer userResourceNo) {
        this.userResourceNo = userResourceNo;
    }

    public Integer getUserNo() {
        return userNo;
    }

    public void setUserNo(Integer userNo) {
        this.userNo = userNo;
    }

    public Integer getCommunityNo() {
        return communityNo;
    }

    public void setCommunityNo(Integer communityNo) {
        this.communityNo = communityNo;
    }

    public String getWpUrl() {
        return wpUrl;
    }

    public void setWpUrl(String wpUrl) {
        this.wpUrl = wpUrl == null ? null : wpUrl.trim();
    }

    public String getWpPassword() {
        return wpPassword;
    }

    public void setWpPassword(String wpPassword) {
        this.wpPassword = wpPassword == null ? null : wpPassword.trim();
    }

    public String getResourceIntro() {
        return resourceIntro;
    }

    public void setResourceIntro(String resourceIntro) {
        this.resourceIntro = resourceIntro == null ? null : resourceIntro.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserResource other = (UserResource) that;
        return (this.getUserResourceNo() == null ? other.getUserResourceNo() == null : this.getUserResourceNo().equals(other.getUserResourceNo()))
                && (this.getUserNo() == null ? other.getUserNo() == null : this.getUserNo().equals(other.getUserNo()))
                && (this.getCommunityNo() == null ? other.getCommunityNo() == null : this.getCommunityNo().equals(other.getCommunityNo()))
                && (this.getWpUrl() == null ? other.getWpUrl() == null : this.getWpUrl().equals(other.getWpUrl()))
                && (this.getWpPassword() == null ? other.getWpPassword() == null : this.getWpPassword().equals(other.getWpPassword()))
                && (this.getResourceIntro() == null ? other.getResourceIntro() == null : this.getResourceIntro().equals(other.getResourceIntro()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserResourceNo() == null) ? 0 : getUserResourceNo().hashCode());
        result = prime * result + ((getUserNo() == null) ? 0 : getUserNo().hashCode());
        result = prime * result + ((getCommunityNo() == null) ? 0 : getCommunityNo().hashCode());
        result = prime * result + ((getWpUrl() == null) ? 0 : getWpUrl().hashCode());
        result = prime * result + ((getWpPassword() == null) ? 0 : getWpPassword().hashCode());
        result = prime * result + ((getResourceIntro() == null) ? 0 : getResourceIntro().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userResourceNo=").append(userResourceNo);
        sb.append(", userNo=").append(userNo);
        sb.append(", communityNo=").append(communityNo);
        sb.append(", wpUrl=").append(wpUrl);
        sb.append(", wpPassword=").append(wpPassword);
        sb.append(", resourceIntro=").append(resourceIntro);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}